#ifndef ICHARACTER_HH
#define ICHARACTER_HH
/*
The ICharacter abstract class defines core interfaces for all game characters (players, enemies, etc.),
including health management, attack behavior, state display, and inventory operations, enforcing consistent implementation across subclasses while enabling polymorphism and extensibility.
*/
/*
* ICharacter抽象类为所有游戏角色（玩家、敌人等）定义核心接口，
* 包含以下功能规范：*生命值管理系统，*攻击行为逻辑，*状态显示机制，*背包操作接口
* 通过抽象方法强制子类实现一致性，同时支持多态性和系统扩展性
*/
#include <string>
#include <vector>

namespace DungeonRPG {

class Item; 

class ICharacter {
public:
    virtual ~ICharacter() = default;

    virtual bool isAlive() const = 0;
    virtual bool takeDamage(unsigned damage) = 0;
    virtual bool performAttack(ICharacter& target) = 0;
    virtual std::string getName() const = 0;
    virtual std::string getDescription() const = 0;
    virtual unsigned getHealth() const = 0;
    virtual unsigned getAttack() const = 0;
    virtual unsigned getDefense() const = 0;
    virtual std::string toString() const = 0;

    virtual void addToInventory(Item* item) = 0;
    virtual void displayInventory() const = 0;
    virtual void display() const = 0;
};

}

#endif
